1 Technical Field
In general, the present invention relates to authoring of text and computer-executable code, and more particularly to techniques for automatically generating HTML text and script within web pages.
2. Related Information
In recent years, the Internet has experienced tremendous growth. It""s rapid development has resulted in a growing number of new uses of the Internet and its graphical component, the World Wide Web (the Web). In particular, advances in providing richer, faster and more interactive web sites have contributed to this growth of the Internet as users have become more discriminating in which sites to visit. To attract these users, commercial and corporate Internet site authors attempt to stay ahead of their competition in providing compelling, informative, and useful sites for users and potential customers.
As hypertext markup language (HTML) has enabled the growth of the Internet, corporate users have also expanded the application of HTML to intranet applications as well. In this area as well, authors have strived to enable efficient creation and use of internal web sites while minimizing design-time.
One such example of the improvements in Web technology are dynamic web pages which can provide updated information to the user when the web page is downloaded. For example, dynamic web pages may be used to provide time of day information, table of contents information and searching capabilities of the web site. One common way of providing these dynamic web pages is the use of WebBot components found in the FrontPage web page authoring and management software (from the Microsoft Corporation of Redmond, Washington). WebBot components may comprise run-time scripts or pointers to additional pages. WebBots, which can be dynamic components, when activated, process information present on the FrontPage web at the time that the WebBots components were activated and may generate HTML text on the web page. WebBot components are implemented using a dynamic link library (DLL).
WebBot components, however, are limited in that they cannot take advantage of property browsers and property pages. In addition, certain WebBot components require FrontPage Server Extensions on the web server in which the FrontPage web is published. While the advanced WebBot components perform dynamic processing when the web page is requested, only servers which have the FrontPage Server Extensions may perform this processing.
JAVA applets and certain web browser plug-ins may also be implemented to provide dynamic web pages. However, in a simpler form, JAVA applets and web browser plug-ins are limiting in that they must be written in only certain programming languages. Dynamic web pages may also be provided using ActiveX controls developed by Microsoft Corporation of Redmond, Washington. ActiveX controls are a popular and effective way of encapsulating functionality and distributing this functionality across a variety of platforms. Unlike, JAVA applets and certain plug-ins, ActiveX controls may be written in any number of programming languages ActiveX controls are based on OLE controls or OCX controls and are components (or objects) which can be inserted into a web page or other application to reuse packaged functionality which someone else programmed. For example, Microsoft Internet Explorer 3.0 contains ActiveX controls which allow users to enhance web pages with sophisticated formatting features and animation. ActiveX controls are an enhancement over JAVA applets and certain web browser plug-ins since ActiveX controls may also be used in applications written in any number of programming languages. Hundreds of ready to use ActiveX controls are now available with functionality ranging from a timer control (which simply notifies the system at a particular time) to full-featured spreadsheets and word processors. Web authors may also write their own ActiveX controls using Visual Basic 5.0 or Visual C++ and an ActiveX control framework such as Microsoft Foundation Class Library (MFC), the ActiveX Template Library (ATL), or the BaseCIt framework. ActiveX controls are designated within a web page by use of a standard HTML  less than OBJECT greater than  tag. Typically, object tags include a set of parameters which include name value pairs, which are the persistence information of the control. The object tag includes a set of parameters that specify which control should be used and control the appearance and behavior of the control. which someone else programmed. For example, Microsoft""s Internet Explorer 3.0 contains ActiveX controls which allow users to enhance web pages with sophisticated formatting features and animation. ActiveX controls are an enhancement over Java applets and certain web browser plug-ins since ActiveX controls may also be used in applications written in any number of programming languages. Hundreds of ready to use ActiveX controls are now available with functionality ranging from a timer control (which simply notifies the system at a particular time) to full-featured spreadsheets and word processors. Web authors may also write their own ActiveX controls using Visual Basic 5.0 or Visual C++ and an ActiveX control framework such as Microsoft Foundation Class Library (MFC), the ActiveX Template Library (ATL), or the BaseClt framework. ActiveX controls are designated within a web page by use of a standard HTML  less than OBJECT greater than  tag. Typically, object tags include a set of parameters which include name value pairs, which are the persistence information of the control. The object tag includes a set of parameters that specify which control should be used and control the appearance and behavior of the control.
ActiveX controls currently, however, only are compatible with Internet Explorer (IE) web browsers (by the Microsoft Corporation). While developers desire to use the encapsulation and distribution advantages of ActiveX controls, they may wish their developed code to run in browsers other than Internet Explorer. Developers are faced with a dilemma: to author full, rich code using all the features of ActiveX controls while limiting the end use of the controls to only Internet Explorer or to author simple code which can run on a variety of browsers. ActiveX controls are also limiting in that they cannot author HTML and script in a web page. Web developers must author HTML and script themselves to provide certain features on a web page. Further, the HTML and script must be authored in alternative representations in order to accommodate all types of web browsers. This forces web page authors to become experts in the capabilities and needs of all web browsers.
Many of the aforementioned problems are solved by providing a method and apparatus for authoring text and computer-executable code. In one embodiment of the present invention, the present invention is a tool for web developers which automatically generates HTML text and script onto a web page. Under this embodiment, a developer when designing a web page inserts a control into the web page. When the file is saved, the editor or container asks the control for both its design-time information as well as its run-time HTML text and run-time script which should be written into the file. The design-time information of the control is then rendered invisible to the run-time user by being wrapped inside an HTML comment. The control is thereby made invisible to any downstream processor that respects HTML comments such as web browsers. In an alternative embodiment, the design-time information may be filtered out prior to processing the run-time information. This filter may also be referred to as stripping the design-time information of the control out of the web page when forwarded to the run-time platform. The present invention may be implemented within any system to generate text and/or script. For example, the present invention may be used to generate C++ code in a C++ development environment.
Advantageously, in one embodiment, the present invention allows developers to design web pages that can be accessed by web browsers regardless of their handling capabilities such as ActiveX or HTML only. In addition, processing is performed when the files are saved rather than when the file is accessed by the web browser.
In one application, the present invention generates HTML script and Active Server Page (ASP) code that is inserted into an ASP page. In this case, the control is stripped from the file when the file is processed for delivery to a web browser.
In one embodiment, the present invention uses a Component Object Model (COM) component thereby allowing the controls to be utilized across multiple applications. The controls may be, for example, ActiveX controls that automatically generate HTML text and script when the file is saved. The controls may be written using any development tool including, but not limited to, Visual C++ 5.0, Visual Basic 5.0, Borland Delphi or C++, and Symantec C++. Advantageously, the present invention may be implemented within any type of HTML editor, including but not limited to, FrontPage and Visual InterDev editors.
The present invention may be utilized in applications which requires complex or lengthy scripting thereby alleviating the burden on developers or programmers. The programmer also does not need to know all of the calls for scripting since the control of the present invention can perform the necessary scripting. Such applications may be for example, applications incorporating complex database controls.
Design-time controls are similar to embedded wizards that can be continuously edited to modify the text they generate for a web page. DTCs take advantage of OLE design-time capabilities (including direct manipulations, property sheets, and persistence) to capture user inputs, thereby extending the capabilities of an editor which supports design-time controls.
As used herein, a persist operation refers to writing information to a non-volatile storage medium where the information relates to the current state of an object. The information written is sufficient so that, when the object is recreated in memory, the object can be restored to its previous state.
As used herein, an instantiate operation refers to creating an instance of an object type in memory.
As used herein, italicized text relates, generally, to interfaces and methods (or functions) as present in COM. An interface in COM is a description of related methods one can call on an object. For example, the following term xe2x80x9cIInterface::IMethod(Argument1, Argument2)xe2x80x9d relates to a COM interface xe2x80x9cInterfacexe2x80x9d with an associated method xe2x80x9cMethodxe2x80x9d using the arguments Argument1 and Argument2.